<?php
include ('conn/conn.php');
$sql = mysql_query("select * from tb_content order by id desc limit 0,5");
$contentarr=array();
while ($result=mysql_fetch_array($sql,MYSQL_ASSOC)){
	$result[content]=substr($result[content],0,400)."......";
	$contentarr[]=$result;
}
?>

<div id="content">
				<table cellspacing=0 cellpadding=0 border=0 width="100%" align="center" border="0">
					<tr><td>&nbsp;</td><td></td></tr>
					<tr>
						<td>&nbsp;</td>
						<td><strong>最新发布信息：</strong></td>
					</tr>
					<?php 
						foreach ($contentarr as $content){
							echo "<tr><td></td><td><hr align=center width=100% size=2 noshade color=#bdd3ef></td></tr>";
							echo "<tr><td></td><td></td></tr>";
							echo "<tr><td>文章标题</td><td><strong><a href=\"view.php?id=$content[id]\">$content[title]</a></strong></td></tr>";
							echo "<tr><td>文章内容</td><td>$content[content]</td></tr>";
						}
					?>
				</table>
</div>
